export enum VISIBILITY_FILTER {
  SHOW_COMPLETED = 'SHOW_COMPLETED',
  SHOW_ACTIVE = 'SHOW_ACTIVE',
  SHOW_ALL = 'SHOW_ALL'
}

export type CourseItemType = {
  name: string,
  id: number,
  ar: Array<{ name: string }>,
  al: { name: string },
  course: { id: number },
  copyright: number,
  st?: number,
  current?: boolean
}

export type CurrentCourseInfoType = {
  id: number,
  name: string,
  ar: Array<{ name: string }>,
  al: { picUrl: string, name: string },
  url: string,
  lrcInfo: Record<string, any>,
  dt: number, // 总时长，ms
  st: number // 是否喜欢
}

export type playListDetailInfoType = {
  coverImgUrl: string,
  playCount: number,
  name: string,
  description?: string,
  tags: Array<string | undefined>,
  creator: { avatarUrl: string, nickname: string },
  tracks: Array<CourseItemType>
}

export type CourseType = {
  playListDetailInfo: playListDetailInfoType,
  playListDetailPrivileges: Array<{ st: number }>,
  // 可播放歌曲列表
  canPlayList: Array<CourseItemType>,
  // 是否正在播放
  isPlaying: boolean,
  // 推荐歌单
  recommendPlayList: Array<Record<string, any>>,
  // 推荐歌单
  recommendAnchor: Array<Record<string, any>>,
  // 推荐新音乐
  recommendNewCourse: Array<Record<string, any>>,
  // 推荐精彩节目
  recommend: Array<Record<string, any>>,
  // 我创建的歌单
  myCreateList: Array<Record<string, any>>,
  // 我收藏的歌单
  myCollectList: Array<Record<string, any>>,
  // 当前播放的歌曲id
  currentCourseId: string,
  // 当前播放的歌曲详情
  currentCourseInfo: CurrentCourseInfoType,
  // 当前播放的歌曲在播放列表中的索引,默认第一首
  currentCourseIndex: number,
  // 播放模式
  playMode: 'loop' | 'one' | 'shuffle',
  // 喜欢列表
  likeCourseList: Array<number>,
  recentTab: number
}

export type anchorListType = {
  anchorListDetailInfo: { name: string },
}
